<?php

use Illuminate\Routing\Router;


Route::group([
    'prefix' => 'admin/course',
    'namespace' => 'Frieza\\Modules\\Course\\Controllers',
    'middleware' => [
        'web',
        'admin'
    ],
], function (Router $router) {
    $router->get('/index', 'IndexController@index');
    $router->get('/recommend', 'IndexController@recommend');
    $router->get('/index/{id}/edit', 'IndexController@create');
    $router->get('/index/create', 'IndexController@create');
    $router->get('/create', 'IndexController@create');
    $router->post('/sort', 'IndexController@sort');
    $router->post('/save', 'IndexController@save');
    $router->get('/index/{courseId}/edit/{chapterId}/edit', 'IndexController@createChapter');
    $router->post('/saveChapter', 'IndexController@saveChapter');
    $router->get('/evaluation', 'IndexController@evaluation');
    $router->get('/index/{id}/white', 'IndexController@white');
    $router->post('/index/{id}/saveWhite', 'IndexController@saveWhite');

    $router->post('/offline', 'IndexController@offline');
    $router->post('/online', 'IndexController@online');
    $router->delete('/index/{courseId}/edit/{chapterId}', 'IndexController@delChapter');

    $router->get('/order', 'OrderController@index');
    $router->get('/daily', 'OrderController@daily');
});
